import java.util.*;
import java.io.*;

public class Packet implements Serializable{
	
	private Hashtable ht = new Hashtable();
       public MessageType Type;

	public enum KeyType
	{
		MESSAGE,
		CLIENT_NAME,
		CLIENT_ACTION,
		CLIENT_LIST,
		CLIENTOBJ,
		KEY_ARRAYLIST_CLIENTS,
	};
	
	public enum MessageType
	{
		REGISTER,			 //Register the machine.
		REGISTEROK,			 //Register is OK on server.
		START,				 //Start the game
		CLIENT_ACTION,			 //Action taken by a client
		SETUP,
		STARTGAME,			 //Message passed from the server to start the game.
		LEAVEGAME,			 //Message passed when a client leaves a game.
		PACKETERR,			 //This is an error packet.
	};
		

    public void setKeyValue(Packet.KeyType k, Object val)
    {
	ht.put(k, val);
    }
 
    public Object getKeyValue(Packet.KeyType k)
    {
	return	ht.get(k);
    }
		
}

